home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C64'er
/
C64'er.iso
/
sh6x
/
sh65b.d64
/
cross-ref 64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-03-30
|
5KB
|
177 lines
10 REM*********************************
20 REM* PROGRAMMNAME : XREF *
30 REM* C-64 *
40 REM* FLOPPY 1541 O. AEHNLICHE *
50 REM* DRUCKER (Z.B. MPS 801) *
60 REM* VON STEFAN BECKER *
70 REM*********************************
80 CLR:GOTO150
90 GET#1,A$:X=ASC(A$+N$):IF(64ANDST)=0THENRETURN
100 CLOSE1:IFPATHENPA=0:GOTO520
110 GOTO960
120 GOSUB90:X1=X:GOSUB90:X=X1+256*X:RETURN
130 IFSP<OBANDVA<OBANDPS<OBTHENRETURN:REM*** GRENZEN ERREICHT ? ***
140 PRINT:PRINT"[194]ITTE DIE [214]ARIABLE OB IN [218]EILE 150 VERGROESSERN.":GOTO1310
150 OB=500:DIMSP$(OB),PS$(OB),VA$(OB)
160 REM*** OB IST OBERGRENZE DER ANZAHL DER SPRUENGE UND VARIABLEN ***
170 POKE53280,6:POKE53281,6
180 N$=CHR$(0)
190 LE$=" "
200 PRINTCHR$(147)CHR$(9)CHR$(14)CHR$(8)CHR$(144);
210 PRINT" [195]ROSS-[210]EFERENZ-[204]ISTER "
220 PRINT"[193]USGABE AUF ":PRINT"[194][146]ILDSCHIRM ODER [196][146]RUCKER[145][145][145]"
230 PRINTSPC(12);:POKE204,0
240 GETA$:IFA$<>"B"ANDA$<>"D"GOTO240
250 IFA$="B"THENPRINT"[194]ILDSCHIRM.":DV=3:GOTO270
260 PRINT"[196]RUCKER.":DV=4
270 PRINT" [145]"
280 OPEN1,0:PRINT"[208]ROGRAMMNAME: ";:INPUT#1,NA$:CLOSE1:PRINT
290 OPEN2,8,15:OPEN1,8,2,NA$+",P,R":GOSUB1290:GOSUB120:IFX=2049THEN310
300 PRINT:PRINT"[196]AS [208]ROGRAMM MUSS AB 2049 LIEGEN.":GOTO1310
302 :
304 :
305 REM********************************
306 REM PASS 1 SPRUNGTABELLE
308 REM********************************
309 :
310 PRINT"[147][208]ASS 1 ([211]UCHEN DER [211]PRUENGE)":PA=1
320 GOSUB120:GOSUB120:ZE$=RIGHT$(" "+STR$(X),5):PRINT""ZE$
330 GOSUB90:IFX=137ORX=138ORX=141ORX=167THENS1$="":GOTO360
340 IFX=0GOTO320
350 GOTO330
360 GOSUB90:IFX=32GOTO360
370 IFX>=48ANDX<=57THENS1$=S1$+A$:GOTO360
380 IFS1$=""GOTO470
390 S1$=RIGHT$(" "+S1$,6)
400 IFLEFT$(SP$(SP),5)<>ZE$THENSP=SP+1:GOSUB130:SP$(SP)=ZE$+":"
410 IFLEN(SP$(SP))>70THENSP=SP+1:GOSUB130:SP$(SP)=ZE$+":"
420 IFRIGHT$(SP$(SP),6)<>S1$THENSP$(SP)=SP$(SP)+S1$
430 FORI=1TOPS
440 IFLEFT$(PS$(I),6)<>S1$THENNEXT:PS=I:GOSUB130:PS$(I)=S1$+":"
450 IFLEN(PS$(I))>70THENNEXT:PS=PS+1:I=PS:GOSUB130:PS$(I)=S1$+":"
460 IFRIGHT$(PS$(I),5)<>ZE$THENPS$(I)=PS$(I)+" "+ZE$
470 IFX=0GOTO320
480 IFX=44THENS1$="":GOTO360
490 IFX=58ORX>=127OR(X>=65ANDX<=90)GOTO330
500 PRINT:PRINT"[198]EHLER IM [209]UELLPROGRAMM. [218]EILE:"ZE$:GOTO1310
502 :
504 :
506 REM -------------------------------
510 REM*** SORTIEREN DER SPRUNGZIELE (FELD PS$( ***
515 REM -------------------------------
516 :
520 FORI=1TOPS
530 FORJ=ITOPS
540 IFLEFT$(PS$(I),5)<LEFT$(PS$(J),5)GOTO560
550 PS$(0)=PS$(I):PS$(I)=PS$(J):PS$(J)=PS$(0)
560 NEXTJ
570 NEXTI
574 :
575 REM--------------------------------
576 REM AUSGABE SPRUENGE + SPRUNGZIELE
577 REM--------------------------------
578 :
580 OPEN1,DV,7:PRINT#1,"[208]ROGRAMMNAME: "NA$:PRINT#1
590 PRINT#1,"SPRUNGTABELLE "
600 PRINT#1,"--------------------------"
605 PRINT#1,"ZEILE : SPRUNG AUF ZEILE ":PRINT#1
610 FORI=1TOSP
620 IFLEFT$(SP$(I-1),5)=LEFT$(SP$(I),5)THENPRINT#1,SPC(7)MID$(SP$(I),7):GOTO640
630 PRINT#1," "SP$(I)
640 NEXTI:PRINT#1
645 PRINT#1,"ZEILE : WIRD ANGESPRUNGEN VON":PRINT#1
650 PS$(0)="":FORI=2TOPS
660 IFLEFT$(PS$(I-1),6)<>LEFT$(PS$(I),6)THENPRINT#1,PS$(I):GOTO680
670 PRINT#1,SPC(6);MID$(PS$(I),7)
680 NEXTI:CLOSE1
690 PRINT"[206][146]OCHMALS/[215][146]EITER"
700 GETA$:IFA$<>"N"ANDA$<>"W"GOTO700
710 IFA$="N"GOTO580
712 :
714 :
715 REM********************************
716 REM PASS 2 VARIABLE SUCHEN
718 REM********************************
719 :
720 PRINT"[147][208]ASS 2 ([211]UCHEN DER [214]ARIABLEN)"
730 OPEN1,8,2,NA$+",P,R":GOSUB1290:GOSUB120
740 GOSUB120:GOSUB120:ZE$=RIGHT$(" "+STR$(X),5):PRINT""ZE$:Y=0
750 GOSUB90
760 IFX=0GOTO740
770 IFX=34ORX=131ORX=143GOTO800
780 IFX>64ANDX<91GOTO850
790 GOTO750
800 IFX=131THENY=1
810 GOSUB90:IFX=0GOTO740
820 IFX=34GOTO750
830 IFX=58ANDY=1GOTO750
840 GOTO810
850 V1$=A$
860 GOSUB90
870 IFX=36ORX=37OR(X>47ANDX<58)OR(X>64ANDX<91)THENV1$=V1$+A$:GOTO860
880 IFX=40THENV1$=V1$+A$
890 V1$=LEFT$(V1$+" ",4)
900 FORI=1TOVA
910 IFLEFT$(VA$(I),4)<>V1$THENNEXT:VA=I:GOSUB130:VA$(I)=V1$+" :"
920 IFLEN(VA$(I))>50THENNEXT:VA=VA+1:I=VA:GOSUB130:VA$(I)=VA$+" :"
930 IFRIGHT$(VA$(I),5)<>ZE$THENVA$(I)=VA$(I)+" "+ZE$
940 IFX=0GOTO740
950 GOTO750
952 :
954 :
956 REM -------------------------------
960 REM *** SORTIEREN DER VARIABLEN (FELD VA$( ***
965 REM -------------------------------
968 :
970 FORI=1TOVA
980 FORJ=ITOVA
990 IFLEFT$(VA$(I),4)>LEFT$(VA$(J),4)GOTO1010
1000 VA$(0)=VA$(I):VA$(I)=VA$(J):VA$(J)=VA$(0)
1010 NEXTJ
1020 NEXTI:VA=VA-1:I=VA
1025 :
1030 PRINT"[147][215]OLLEN [211]IE ZU DEN [214]ARIABLEN":PRINT"[194]EMERKUNGEN EINGEBEN? ";
1040 GETA$:IFA$="N"GOTO1180
1050 IFA$<>"J"GOTO1040
1060 PRINT"[202]A"
1070 PRINT"[214]ARIABLENNAME: ";LEFT$(VA$(I),4)
1073 PRINTLE$
1075 IFLEN(VA$(I))>70THENPRINT"[145][145]"RIGHT$(VA$(I),25)
1080 GETA$:IFA$<>"[145]"ANDA$<>""ANDA$<>CHR$(13)GOTO1080
1090 IFA$="[145]"THENI=I+1:IFI>VATHENI=VA
1100 IFA$=""THENI=I-1:IFI<1THENI=1
1110 IFA$<>CHR$(13)GOTO1070
1120 VR$=LEFT$(VA$(I),4):OPEN1,0
1130 PRINT"[212]EXT:";:INPUT#1,TE$:PRINT:CLOSE1:TE$=LEFT$(TE$,25)
1140 FORI=VATO1STEP-1
1150 IFLEFT$(VA$(I),4)<>VR$THENNEXT:PRINT"[206]ICHT VORHANDEN.":GOTO1070
1160 VA$(I)=LEFT$(VA$(I)+LE$,55)+RIGHT$(LE$+TE$,25):GOTO1030
1170 VR$=LEFT$(VR$,4)
1174 ;
1175 REM-------------------------------
1176 REM AUSGABE VARIABLE
1177 REM-------------------------------
1180 PRINT:OPEN1,DV,7
1190 PRINT#1,"LISTE DER VARIABLEN :"
1200 PRINT#1,"-------------------------"
1210 FORI=VATO1STEP-1
1220 IFLEFT$(VA$(I+1),4)<>LEFT$(VA$(I),4)THENPRINT#1,VA$(I):GOTO1240
1230 PRINT#1,SPC(6);MID$(VA$(I),7)
1240 NEXTI
1250 PRINT"N[146]OCHMALS/W[146]EITER"
1260 GETA$:IFA$<>"N"ANDA$<>"W"GOTO1260
1263 IFA$="N"GOTO1190
1266 PRINT"[214]ARIABLENLISTE OHNE [218]EILENNUMMER (J/N)"
1267 GETR$:IFR$=""THEN1267
1268 IFR$<>"J"THENPRINT:PRINT"ENDE":GOTO1310
1269 PRINT#1:PRINT#1:PRINT#1,"[214]ARIABLENLISTE OHNE [218]EILENNUMMER"
1270 PRINT#1,"-------------------------------"
1271 FORI=VATO1STEP-1
1272 IFLEN(VA$(I))>70THENPRINT#1,LEFT$(VA$(I),8);RIGHT$(VA$(I),25):GOTO1274
1273 PRINT#1,LEFT$(VA$(I),8)
1274 NEXTI
1280 GOTO1310
1290 INPUT#2,A$,B$:IFA$="00"THENRETURN
1300 PRINT:PRINT"[196]ISK-[197]RROR: ";B$
1310 CLOSE1:CLOSE2:END